import {
  Link,
  Outlet,
  useLocation,
  // useParams,
  useSearchParams,
} from "react-router-dom";
function Acticle() {
  const [query] = useSearchParams();
  const id = query.get("id");
  const name = query.get("name");

  const location = useLocation();
  console.log(location);

  return (
    <div className="App">
      <h1>文章</h1>
      <div>
        id:{id}-name:{name}
      </div>
      <Link to="/acticle">关于</Link>|<Link to="/acticle/board">面板</Link>
      {/* 配置二级路由 */}
      <Outlet></Outlet>
    </div>
  );
}

export default Acticle;
